<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>VM Parameter</title>
</head>
<body>
<h1>VM Params</h1>
<table>
<%
         float free = java.lang.Runtime.getRuntime().freeMemory() / (1024 * 1024);
         float total = java.lang.Runtime.getRuntime().totalMemory() / (1024 * 1024);
         float max = java.lang.Runtime.getRuntime().maxMemory() / (1024 * 1024);
         out.print("<tr><td>memory</td><td>" + free + " mb free of " + total + " mb</td></tr>");
         out.print("<tr><td>Xmx</td><td>" + max + " mb</td></tr>");
 %>
<%
	Properties props = System.getProperties();
	Enumeration propNames = props.propertyNames();
	
	while (propNames.hasMoreElements()) {
		String propName = (String)propNames.nextElement();
		out.print("<tr><td>" + propName + "</td><td>");
		try {
			out.print(System.getProperty(propName));
		} catch (Exception e) {
			out.print("n/a");
		}
		out.print("</td></tr>");
	}
%>
</table>
</body>
</html>